import ExcelJS from "exceljs";

const options = {
    // sharedStrings: "emit",
    hyperlinks: "emit",
    worksheets: "emit",
  };
  const workbookReader = new ExcelJS.stream.xlsx.WorkbookReader('D:\\Project\\cocos\\one\\doc\\configs\\skill.xlsx', options as any);
  workbookReader.read();
  
 //@ts-ignore
  workbookReader.on('worksheet', worksheet => {
    let index = 1;
    worksheet.on('row', (row:ExcelJS.Row) => {
        if(index == 1){
            console.log(row.cellCount, row.getCell(2).text);
        }

        index++;
    });
  });
     //@ts-ignore
  workbookReader.on('shared-strings', sharedString => {
    console.log(1);
    
  });

   //@ts-ignore
  workbookReader.on('end', () => {
    console.log('done!');
    
  });
   //@ts-ignore
  workbookReader.on('error', (err) => {
    console.log('error', err);
  });